-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add sync-upstream action #538
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Brooks Newberry <[email protected]>
Congratulations on the Mermaid Flowgram! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The secrets of GITHUB_TOKEN are being deprecated, we have to use from the vault.
|
||
- name: Update branch status | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: | | ||
git checkout -B ${{ matrix.branch }} upstream/${{ matrix.branch }} | ||
git push -f origin ${{ matrix.branch }} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Load Secrets from Vault
continue-on-error: false
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/github/app-credentials appId | APP_ID ;
secret/data/github/repo/${{ github.repository }}/github/app-credentials privateKey | PRIVATE_KEY ;
- name: Create App Token
continue-on-error: false
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ env.PRIVATE_KEY }}
This PR adds a reusable action to sync a forked repo with any number of upstream branches
Intended workflow: